﻿using Catel.Articles.Base.Data.Attributes;
using Catel.Articles.Base.UI;

namespace Catel.Articles._02___WPF_controls.Examples.ToggleRadioButton
{
    [Example("ToggleRadioButton", "Example of the ToggleRadioButton control",
        LongDescription = @"The ToggleRadioButton is a control with 2 radiobuttons on it representing yes and no. This way " +
                          @"you can easily ask questions to your users using radio buttons.",
        SourceFileName = "/Examples/ToggleRadioButton/Code.txt",
        ImageUri = "/Examples/ToggleRadioButton/Screenshot.png",
        ClickHandlerName = "ShowExample")]
    public class Example
    {
        /// <summary>
        /// Shows the example.
        /// </summary>
        private static void ShowExample()
        {
            // Create control
            Windows.Controls.ToggleRadioButton toggleRadioButton = new Windows.Controls.ToggleRadioButton();
            toggleRadioButton.TextCaption = "Do you like this control?";
            
            // Show control
            ExampleHelper.ShowControlInWindow(toggleRadioButton, null, 400, 400);
        }
    }
}
